#pragma once


class CBaseImage;

class CThumbUI : public CControlUI
{
public:
	CThumbUI();
	virtual ~CThumbUI();

protected:

	HIMAGELIST     m_hImageList;
	bool           m_bDraging;

private:

	CBaseImage* m_pImage;
	//void*     m_pThumbDib;
	int m_width;
	int m_height;

public:
	virtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
	virtual LPCTSTR GetClass() const;
	virtual LPVOID GetInterface(LPCTSTR pstrName);
	virtual void SetPos(RECT rc);

	bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl);
	void DrawThumb(Gdiplus::Graphics& gs, const RECT& rc);

	virtual void DoEvent(TEventUI& event);
	//virtual void PaintStatusImage(HDC hDC);

public:
	void SetImage(CBaseImage* pImg) { m_pImage = pImg; }
};
